//
//  HomeTitleButton.swift
//  Status
//
//  Created by 花轮 on 15/5/14.
//  Copyright (c) 2015年 花轮. All rights reserved.
//

import UIKit

class HomeTitleButton: UIButton {
    override func layoutSubviews() {
        super.layoutSubviews()
        
        if titleLabel!.text == "首页"
        {
            imageView!.frame = CGRectZero
            return
        }
        
        titleLabel!.frame = CGRectOffset(titleLabel!.frame, -self.imageView!.bounds.size.width, 0)
        imageView!.frame = CGRectOffset(imageView!.frame, titleLabel!.bounds.size.width, 0)
    }
}
